<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />


<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>行业分类</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> <a _href="welcome.html" class="fun-toindex" href="javascript:;">首页</a> <span class="c-gray en">&gt;</span> 分类管理 <span class="c-gray en">&gt;</span> 行业分类 <a class="btn btn-success radius r mr-20 reload" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
	<span class="r" style="margin-top: -2px; box-sizing: border-box;">
	    
<!-- 	    <select name="gc_type" id="gc_type" class="select" style="width: auto; height: 31px; vertical-align: middle;">
	        <option value="" selected="">类型</option>
	        <option value="1">普通分类</option>
	        <option value="2">沐熙自营</option>

	    </select> -->

	   

	   
	
	    <!-- <span style="position:relative">
	        <input type="text" name="keywords" id="search-input" placeholder="回执、快递单号/货名/手机号/备注/用户名/ID" style="width:250px" class="input-text">
	        <i class="Hui-iconfont i-close" id="inputclear">&#xe706;</i>
	    </span> -->

	    <!-- <button name="" id="search" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button> -->
	</span>
</nav>
<div class="pd-10">
	

	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c sort0">
					<th width="40" class="valueid"><input name="" type="checkbox" value=""></th>
					<th width="40" class="fun-sort2" data-name="gc_id" data-flag="0">ID</th>
					<th width="100">分类名称</th>
					<!-- <th width="80">类别</th> -->
					<th width="100">图标</th>
					<th>分类描述</th>
					<th width="40" class="fun-sort2" data-name="gc_sort" data-flag="0">排序</th>
					<th width="60">显示状态</th>
					<th width="60">首页推荐</th>
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody id="content_sp">
				
			</tbody>
		</table>
	</div>

	<div class="cl pd-5 bg-1 bk-gray mt-10"> 
		
		<a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="stop"><i class="Hui-iconfont">&#xe6de;</i> 批量关闭</a> 
		<a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="start"><i class="Hui-iconfont">&#xe603;</i> 批量开启</a> 
		<a href="javascript:;" class="btn btn-danger l mr-10 mt-5 radius fun-all" data-type="del"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> 
		<a class="btn btn-primary radius mt-5 l mr-10" data-title="添加内容" href="javascript:;" onclick="_open('添加顶级分类','product-category-add.html','80%','70%',false)" href="javascript:;">
			<i class="Hui-iconfont">&#xe600;</i> 添加
		</a>
		<span class="r pt-5"  style="line-height: 35px;" id="page"></span>
		<span class="r mr-10"  style="line-height: 40px;" id="dataall"></span>  
	</div>

</div>
<!-- 模版 -->
<script id="test" type="text/html">
<% for (x in list) { %>
	<tr class="text-c va-m sort1" bgcolor="#ffffff">
		<td class="valueid"><input name="" type="checkbox" value="<%=list[x].gc_id%>"></td>
		<td class="text-l"><%=list[x].gc_id%></td>
		
		<td class="text-l">
		<% if(list[x].child){ %>
			<a style="text-decoration:none; " href="javascript:;"  class="fun-openclose" data-flag="0" data-sortnum="1">
			<b><span style="width: 18px; font-size: 16px; display: inline-block;">+</span><%=list[x].gc_name%>(<%=list[x].child.length;%>)</b> </a>
		<% }else{ %>
			<b style="padding-left:20px;"><%=list[x].gc_name%></b>
		<% } %>

		</td>

		<td><a href="javascript:;"><img class="pic-thumb" src="/Manage/images/blank.gif" data-lazy="<%=list[x].gc_icon%>"></a></td>
		<td class="text-l "><%=list[x].sc_description%></td>
		<td class="text-c ">
		<input type="text" size="3" class="paixu fun-paixu" name="gc_sort" value="<%=list[x].gc_sort%>" style="text-align: center;"></input>
		</td>
		<td class="td-status">
			<input type="checkbox" class="switch fun-start-stop" style="outline: none;" <%if(list[x].gc_show==1){ %>checked<% } %>/>
		</td>
		
		<!-- <td class="text-c td-tuijian">
				<input type="checkbox" class="inputboxt fun-tj" style="outline: none;" <%if(list[x].is_index==1){ %>checked<% } %>/>
			</td> -->
		<td class="text-c"><input type="checkbox" class="inputboxt tj fun-tj" style="outline: none;" <%if(list[x].is_index==1){ %>checked<% } %>/></td>
		<td class="td-manage f-18">
			<a style="text-decoration:none" onClick="_open('添加<b class=c-primary><%=list[x].gc_name%></b>子分类','product-category-add.html?parentid=<%=list[x].gc_id%>','80%','70%',false)" href="javascript:;" title="添加子分类"><i class="Hui-iconfont">&#xe600;</i></a> 
			<a style="text-decoration:none" onClick="_open('分类编辑','product-category-add.html?editid=<%=list[x].gc_id%>','80%','70%',false)" class="ml-5 edit" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 

 			<a style="text-decoration:none" class="ml-5 fun-del" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
		</td>
	</tr>

	<% for (j in list[x].child) { %>
		<tr class="text-c va-m sort2" bgcolor="#ececf0" style="display: none;">
			<td class="valueid"><input name="" type="checkbox" value="<%=list[x].child[j].gc_id%>"></td>
			<td class=""><%=list[x].child[j].gc_id%></td>
			<td class="text-l " style="padding-left: 30px;">
			<% if(list[x].child[j].child){ %>
				<a style="text-decoration:none; padding-left: 15px;" href="javascript:;">
					<span>+</span><%=list[x].child[j].gc_name%>(<%=list[x].child[j].child.length;%>) 
				</a>
			<% }else{ %>
				<%=list[x].child[j].gc_name%>
			<% } %>
			</td>
			<td><a href="javascript:;"><img class="pic-thumb" src="/Manage/images/blank.gif" data-lazy="<%=list[x].child[j].gc_icon%>"></a></td>
			<td class="text-l "><%=list[x].child[j].sc_description%></td>
			<td class="text-c ">
			<input type="text" size="3" class="paixu fun-paixu" name="gc_sort" value="<%=list[x].child[j].gc_sort%>" style="text-align: center;"></input>
			</td>
			<td class="td-status">
				<input type="checkbox" class="switch fun-start-stop" style="outline: none;" <%if(list[x].child[j].gc_show==1){ %>checked<% } %>/>
			</td>
	
			<!-- <td class="text-c td-tuijian">
				<input type="checkbox" class="inputboxt fun-tj" style="outline: none;" <%if(list[x].is_index==1){ %>checked<% } %>/>
			</td> -->
			<td class="text-c"><input type="checkbox" class="inputboxt tj fun-tj" style="outline: none;" <%if(list[x].child[j].is_index==1){ %>checked<% } %>/></td>
			<td class="td-manage f-18">
			<a style="text-decoration:none" onClick="_open('添加<b class=c-primary><%=list[x].child[j].gc_name%></b>子分类','product-category-add.html?parentid=<%=list[x].child[j].gc_id%>','80%','70%',false)" href="javascript:;" title="添加子分类"><i class="Hui-iconfont">&#xe600;</i></a> 
			<a style="text-decoration:none" onClick="_open('分类编辑','product-category-add.html?editid=<%=list[x].child[j].gc_id%>&parentid=<%=list[x].gc_id%>','80%','70%',false)" class="ml-5 edit" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 
			<a style="text-decoration:none" class="ml-5 fun-del" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
			</td>
		</tr>
	
	<%}%>
<%}%>
</script>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>

<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<script type="text/javascript" src="lib/laypage/laypage.js"></script> 
<script src="/Manage/js/lazyload.min.js"></script>

<script type="text/javascript">
var API=API_GOODSCLASS;
var kk=API;
var orderby='';
var search='';

loaddata(API,1);



$("#search").click(function(){
	kk=API+"?";

    var param=[
        // 'k='+encodeURI(document.querySelector('input[name=keywords]').value),
        // 'type='+document.querySelector('select[name=gc_type]').value,
        // 't='+document.querySelector('select[name=state]').value,
        // 'time='+document.querySelector('input[name=time]').value,

    ];
	search=param.join('&');

    kk=kk+search+'&'+orderby;
	loaddata(kk,1);

     
})





$(document).ready(function(){

	jQuery.Huifold2 = function(obj,obj_c,speed,Event){	
		$(obj).bind(Event,function(){
			if($(this).closest(".sort1").nextUntil(".sort1").is(":visible")){
				$(this).closest(".sort1").removeClass("selected");
				$(this).closest(".sort1").nextUntil(".sort1").slideUp(speed);
				$(this).find("span").html("+");
				
			}
			else{
				$(this).closest(".sort1").nextUntil(".sort1").slideDown(speed);
				$(this).closest(".sort1").addClass("selected");
				$(this).closest(".sort1").nextUntil(".sort1").addClass("selected");
				$(this).find("span").html("-");
				
			}
		});
	}
	
})
</script>

</body>
</html>